<template>
    <div class="container">
      <plan-tab v-on:onhide='toIndexContentfun' ></plan-tab>
      <!--填写操作-->
      <el-row class="fillin bg_colorF5 broder_b p_l12 p_r12">
        <el-col :span="1" class="t_left line_height37">
          <span class="font_12 color_33">公式</span>
        </el-col>
        <el-col :span="4" class="t_left">
          <select class="fillin_input m_left5"  v-model="gongshivalue">
              <option value="">默认 </option>
          </select>
        </el-col>
        <el-col :span="5" class="flex flex-align-center">
          <span class="font_12 color_33" style="margin-top: 0.05rem;">定码个数</span>
          <input class="fillin_input m_left5" v-model="dmnub" :maxlength='dmnubmaxlength' type="text"  onkeyup="if(this.value.length==this.dmnubmaxlength){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"  />
          <div class="change-nub-box">
            <div class="nub-box-top" @click="onAdd(1)">
            </div>
            <div class="nub-box-bottom" @click="reduce(1)">
            </div>
          </div>
        </el-col>
        <el-col :span="5" class="flex flex-align-center">
          <span class="font_12 color_33" style="width:0.55rem;margin-top: 0.05rem;">计划周期</span>
          <input class="fillin_input" v-model="cycle" maxlength="3" />
            <div class="change-nub-box">
            <div class="nub-box-top" @click="onAdd(2)">
            </div>
            <div class="nub-box-bottom" @click="reduce(2)">
            </div>
          </div>
          <span class="font_12 color_33 m_left5 uqren-boder" style="cursor: pointer;" @click="getdefaultPlanlist">确认</span>
        </el-col>
        <el-col :span="9" class="t_right line_height37">
          <span class="uqren-boder" style="cursor: pointer;margin-left:0px">
            <img class="copyimg" src="@/assets/img/plan/iconcopy.png">
          <span class="font_12 color_33" @click="copyplanFn">复制计划</span>
          </span>
        </el-col>
      </el-row>

      <!-- layer弹框遮罩的显示 -->
      <copy-plan :layershow='copyshow'></copy-plan> 
      <showall-plan :showinfo="showinfodata" :allplanshow="allplanshow" v-on:closeallplan="closeallplan"></showall-plan>
      <!--表格数据-->
      <keep-alive>
          <el-row>
          <div class="p12 broder_b">
            <el-table  ref="multipleTable" height="360" :stripe="true" :data="planlist" tooltip-effect="dark" style="width: 100%;border:1px solid #ddd"  @selection-change="handleSelectionChange">
              <el-table-column align="center" lable="全选" type="selection" width="55"></el-table-column>
              <el-table-column align="center" label="计划期数">
                <template slot-scope="scope">{{ scope.row. plan_periods }}</template>
              </el-table-column>
              <el-table-column align="center" prop="final_cut_off" label="最终截止">
                   <template slot-scope="scope">
                        <span v-if="scope.row.plan_result == '等待结果'" style="color:#FF822E">{{scope.row.final_cut_off}}</span>
                        <span v-else>{{scope.row.final_cut_off}}</span>
                  </template>
              </el-table-column>
              <el-table-column align="center" prop="plan_result" label="计划结果" show-overflow-tooltip>
                  <template slot-scope="scope">
                        <span v-if="scope.row.plan_result == '等待结果'" style="color:#909399">{{scope.row.plan_result}}</span>
                        <span v-if="scope.row.plan_result == '挂'" style="color:#00d21f">{{scope.row.plan_result}}</span>
                        <span v-if="scope.row.plan_result == '中'" style="color:#ff251a">{{scope.row.plan_result}}</span>
                  </template>
              </el-table-column>
              <el-table-column align="center"   prop="forecast_code" label="当前预测值" show-overflow-tooltip>
                   <template slot-scope="scope">
                        <div v-if="list_type == 0">{{scope.row.forecast_code}}</div>
                        <div v-if="list_type == 1" class="listType">{{scope.row.forecast_code}}</div>
                  </template>
              </el-table-column>
            </el-table>
          </div>
          <div class="font_12 color_33 p10" style="font-weight: bold;">
            <el-row>当前计划信息：【{{this.$store.state.CaiPiaoLabel}}】预测   【{{leftcacheinfo.name}}定码】  定{{dmnub}}码 {{cycle}}期计划</el-row>
            <el-row>当前计划状态：已完成{{plan_result.total_cycle}}个周期，正确率{{plan_result.percentage}}，错误{{plan_result.false_num}}个，最大连对{{plan_result.right_expect_num}}个，当前连对{{plan_result.con_right_expect_num}}个，最大连错{{plan_result.false_expect_num}}个，当前连错{{plan_result.con_false_expect_num}}个</el-row>
            <el-row>当前预测周期：{{planlistinfo.plan_periods || '第一期'}}</el-row>
            <el-row>温馨提示您：小心参与，理性投资</el-row>
          </div>
        </el-row>
      </keep-alive>
      
    </div>
</template>

<script>
import PlanTab from './PlanTab'
import CascadeSelection from "../CascadeSelection";
import PopupLayer from "./Popuplayer";
import CopyPlan from "./CopyPlan";
import ShowallPlan from "./ShowallPlan";
import SetqqGroupchatlist from "./setQQgroupchatlist";
import SetParameter from "./SetParameter";
export default {
  name: "IndexContent",
  components: {
    PlanTab,
    CascadeSelection,
    PopupLayer,
    CopyPlan,
    ShowallPlan,
    SetqqGroupchatlist,
    SetParameter
  },
  data() {
    return {
      paramstype: "",
      copyshow: false,
      allplanshow: false,
      keepalldatashow: false,
      listshow: false,
      dialogTableVisible: false,
      allVisible: false,
      showinfodata: null,
      gongshivalue: '',
      parentOptions: [
        {
          value: "0",
          label: "默认"
        }
      ],
      dmnub: 5,
      dmnubmaxlength: 1,
      cycle: 3,
      planlist: [],
      planlistinfo: {},
      planinfoid: '',
      startid: '',
      keepPlaninfo: {
          site: '',
          pase: '',
          name: ''
      },
      plan_result: {
        total_cycle: '0',
        percentage: '0.0%',
        false_num: '0',
        right_expect_num:'0',
        con_right_expect_num:'0',
        false_expect_num:'0',
        con_false_expect_num: '0'
      },
      multipleSelection: [],
      getleftinfo: '',
      list_type:0, //玩儿法类型
    };
  },
  computed: {
    lotteryid(){
      return this.$store.state.lottery_id
    },
    casetype(){
      return this.$store.state.CaiPiaoType
    },
    websocketinfo(){
      return this.$store.state.TypeMessage
    },
    checkleftMu(){
      return this.$store.state.leftMenu
    },
    leftmuid(){
        return this.$store.state.leftMenu.id
    },
    leftcacheinfo(){
        return this.$store.state.indexleftinfo
    },
    rcarr(){
      return this.$store.state.leftTaba
    }
  },
  watch: {

    "planlist":"scrollToBottom", //监听开奖数据变化，是滚动条在最底部

    websocketinfo(){  //websochet数据的推送
      if(this.websocketinfo.data.id == this.$store.state.lottery_id){  //匹配当前彩种       
        this.changewebsocketinfo()
        this.getshowPlanlist()       
      }     
    },

    lotteryid(){
      delete this.rcarr.name;
      delete this.rcarr.id;
      delete this.rcarr.status; 
      this.listenindmnubFn()     
      this.dmnubmaxlength = 1    
      this.cycle = 3       
    },

     leftcacheinfo(){  //侧边栏标签的改变 
      if(this.$store.state.tabsName == '计划推荐'){
        this.listenindmnubFn()
        this.dmnubmaxlength = 1    
        this.cycle = 3 
        this.getdefaultPlanlist() 
        this.getshowPlanlist();
      }
     },

  },

  mounted(){   
    this.listenindmnubFn();
    // this.getdefaultPlanlist();
  },

  methods: {
    // 增加定码个数或周期
    onAdd(type){
      if(type === 1){
        this.dmnub ++;
      }else{
        this.cycle ++;
      }
    },

    // 减少定码个数或周期
    reduce(type){
      if(type === 1){
        if(this.dmnub == 1)
          return;
        this.dmnub --;
      }else{
        if(this.cycle == 1)
          return;
        this.cycle --;
      }
    },
    //保持列表滚动条在最底部
    scrollToBottom(){ 
      if(this.$refs){
         this.$nextTick(() => {
            this.$refs.multipleTable.bodyWrapper.scrollTop = this.$refs.multipleTable.bodyWrapper.scrollHeight;
         })
      }
      },

    //定码个数默认显示
    listenindmnubFn(){ 
      var userarr = null;
      if(this.rcarr.name == undefined){
        if(!this.$store.state.leftrecommend[0]){
          return
        }
        userarr = this.$store.state.leftrecommend[0];
      }else if(this.rcarr.name){
        userarr = this.rcarr
      } 

      if(userarr.name == '定位系列' || userarr.name == '直选系列'){
          if(this.casetype == 'k3'){
            this.dmnub = 3
          } else {
            this.dmnub = 5
          }                
      }
      if (userarr.name == '大小系列' || userarr.name == '龙虎系列' || userarr.name == '单双系列' || userarr.name == '基础系列' ){
        this.dmnub = 1              
      }
    },

    toIndexContentfun(type){    
        if(type == 1){  //显示所有计划组件
          this.allplanshow = true
        } else if(type == 2){  //保存所有计划
          var plantitle
           plantitle = this.leftcacheinfo.name
          var planarr = ''

          this.planlist.forEach(item => {
            planarr += item.plan_periods+' '+item.final_cut_off+' '+item.plan_result+' '+item.forecast_code+'\r\n'
          })
          download(planarr.toString(), plantitle, "text/plain");
        }
     },

    getdefaultPlanlist(){  //得到默认计划组号

      let indexnub
      var getname = this.leftcacheinfo.name

       if(getname == '万位' || getname == '万位大小' || getname == '万位单双' || getname == '前二直选复式' || getname == '龙虎' || getname == '冠军' || getname == '冠军大小' || getname == '冠军单双' || getname == '1-10龙虎' || getname == '大小' || getname == '第1位' || getname == '第1位大小' || getname == '第1位单双'){
          indexnub = 0
      } else if(getname == '千位' || getname == '千位大小' || getname == '千位单双' || getname == '后二直选复式' || getname == '亚军' || getname == '亚军大小' || getname == '亚军单双' || getname == '2-9龙虎' || getname == '单双' || getname == '第2位' || getname == '第2位大小' || getname == '第2位单双'){
          indexnub = 1
      } else if(getname == '百位' || getname == '百位大小' || getname == '百位单双' || getname == '前三直选复式' || getname == '季军' || getname == '季军大小' || getname == '季军单双' || getname == '3-8龙虎' || getname == '第3位' || getname == '第3位大小' || getname == '第3位单双'){        
         if(this.lotteryid == 11 || this.lotteryid == 14){ // 福彩3d，江苏快三，百位大小/百位单双从0开始
           indexnub = 0
         }else{
            indexnub = 2
         }
      } else if(getname == '个位' || getname == '个位大小' || getname == '个位单双' || getname == '中三直选复式' || getname == '第4名' || getname == '第4名大小' || getname == '第4名单双' || getname == '4-7龙虎' || getname == '第4位' || getname == '第4位大小' || getname == '第4位单双'){
        if(this.lotteryid == 11 || this.lotteryid == 14){
           indexnub = 2
         }else{
            indexnub = 3
         }
      } else if(getname == '十位' || getname == '十位大小' || getname == '十位单双' || getname == '后三直选复式' || getname == '第5名' || getname == '第5名大小' || getname == '第5名单双' || getname == '5-6龙虎' || getname == '第5位' || getname == '第5位大小' || getname == '第5位单双'){
        if(this.lotteryid == 11 || this.lotteryid == 14){
           indexnub = 1
         }else{
            indexnub = 4
         }
      } else if(getname == '四星直选复式' || getname == '第6名' || getname == '第6名大小' || getname == '第6名单双'){
          indexnub = 5
      } else if(getname == '五星直选复式' || getname == '第7名' || getname == '第7名大小' || getname == '第7名单双'){
          indexnub = 6
      } else if(getname == '第8名' || getname == '第8名大小' || getname == '第8名单双'){
          indexnub = 7
      } else if(getname == '第9名' || getname == '第9名大小' || getname == '第9名单双'){
          indexnub = 8
      } else if(getname == '第10名' || getname == '第10名大小' || getname == '第10名单双'){
          indexnub = 9
      } 

      if(!this.dmnub){
        this.$toast({message: '请输入定码个数'});
          return
      }
     
        var userarr = ''
        if(this.rcarr.name == undefined){
          userarr = this.$store.state.leftrecommend[0]
        }else if(this.rcarr.name){
          userarr = this.rcarr
        } 

        if(userarr.name == '定位系列' || userarr.name == '直选系列'){
          if( this.casetype == 'ssc' || this.casetype == 'pk10' || this.casetype == 'l3d' ){
            this.dmnubmaxlength = 1
          } else if( this.casetype == 'l11x5'  ){
            this.dmnubmaxlength = 2
            if(this.dmnub>10){
                this.$toast({message: '定码个数最大可输入10'});
                return  
            }
          } else if( this.casetype == 'k3'  ){
            this.dmnubmaxlength = 1
            if(this.dmnub>5){
                this.$toast({message: '定码个数最大可输入5'});
                return  
            }
          }    
                 
        }
        if (userarr.name == '大小系列' || userarr.name == '龙虎系列' || userarr.name == '单双系列'){
          if(this.dmnub != 1){
            this.$toast({message: '定码个数只能输入数字1'});
            return 
          }           
        }
         

      if(!this.cycle){
          this.$toast({message: '请输入计划周期'});
          return
      }
      if(this.cycle<1 || this.cycle>100){
          this.$toast({message: '计划周期最高可输入100期，最低可输入1期'});
          return
      }
      
      var Dlsitparams = {
        lottery_id: this.lotteryid,
        label_id: this.leftcacheinfo.id,
        fixed_num: this.dmnub,
        index:indexnub,
        limit: this.cycle
      }
      this.https('Forecast/postClientPlanNumberDefaultList',Dlsitparams, 'post').then(data => {
        // data.forecast_code = data.forecast_code.replace(/\s+/g,""); // 清除空格
        this.list_type = data.type;
        this.planlist = data.default_list;
        this.planlistinfo = data;
        this.statisticalPlanningStatus();
        this.planinfoid = data.id;
        this.startid = data.id;
        this.planlist.push(data)
      })
    },

    // 统计当前计划状态
    statisticalPlanningStatus(){
      var percentage_num = 0; // 正确个数
      var false_num = 0; // 错误个数;
      var true_cont = 0;
      var right_expect_num = 0; // 最大连对
      var false_expect_num = 0; // 最大连错
      var false_cont = 0;
      var con_right_expect_num = 0; // 当前连对
      var con_false_expect_num = 0; // 当前连错
      this.planlist.forEach((e,i) => {
        if(e.plan_result = '中'){
          percentage_num ++;
          if(i == 0){
            true_cont = 1;
          }
          if(i>0){ 
             if(this.planlist[i].plan_result == this.planlist[i-1].plan_result){
               true_cont ++;
               con_right_expect_num = true_cont;
               con_false_expect_num = 0;
               if(true_cont == this.planlist.length){
                 right_expect_num = true_cont;
               }
             }else{
               right_expect_num = true_cont;
               true_cont = 0;
             }
          }
        }else{
          false_num ++;
          if(i == 0){
            false_cont = 1;
          }
          if(i>0){ 
             if(this.planlist[i].plan_result == this.planlist[i-1].plan_result){
               false_cont ++;
               con_right_expect_num = 0;
               con_false_expect_num = false_cont;
               if(false_cont == this.planlist.length){
                 right_expect_num = false_cont;
               }
             }else{
               right_expect_num = false_cont;
               false_cont = 0;
             }
          }
        }
      });
      var percentage = ((percentage_num/this.planlist.length)*100).toFixed(1);  // 正确率
      this.plan_result['total_cycle'] = this.planlist.length;
      this.plan_result['false_num'] = false_num;
      this.plan_result['percentage'] = `${percentage}%`;
      this.plan_result['right_expect_num'] = right_expect_num;
      this.plan_result['con_right_expect_num'] = con_right_expect_num;
      this.plan_result['false_expect_num'] = false_expect_num;
      this.plan_result['con_false_expect_num'] = con_false_expect_num;
    },

    getshowPlanlist(){  //显示所有计划组号
      let indexnub;
      var getname = this.leftcacheinfo.name;

       if(getname == '万位' || getname == '万位大小' || getname == '万位单双' || getname == '前二直选复式' || getname == '龙虎' || getname == '冠军' || getname == '冠军大小' || getname == '冠军单双' || getname == '1-10龙虎' || getname == '大小' || getname == '第1位' || getname == '第1位大小' || getname == '第1位单双'){
          indexnub = 0
      } else if(getname == '千位' || getname == '千位大小' || getname == '千位单双' || getname == '后二直选复式' || getname == '亚军' || getname == '亚军大小' || getname == '亚军单双' || getname == '2-9龙虎' || getname == '单双' || getname == '第2位' || getname == '第2位大小' || getname == '第2位单双'){
          indexnub = 1
      } else if(getname == '百位' || getname == '百位大小' || getname == '百位单双' || getname == '前三直选复式' || getname == '季军' || getname == '季军大小' || getname == '季军单双' || getname == '3-8龙虎' || getname == '第3位' || getname == '第3位大小' || getname == '第3位单双'){        
         if(this.lotteryid == 11 || this.lotteryid == 14){ // 福彩3d，江苏快三，百位大小/百位单双从0开始
           indexnub = 0
         }else{
           indexnub = 2
         }
      } else if(getname == '个位' || getname == '个位大小' || getname == '个位单双' || getname == '中三直选复式' || getname == '第4名' || getname == '第4名大小' || getname == '第4名单双' || getname == '4-7龙虎' || getname == '第4位' || getname == '第4位大小' || getname == '第4位单双'){
        if(this.lotteryid == 11 || this.lotteryid == 14){
           indexnub = 2
         }else{
            indexnub = 3
         }
      } else if(getname == '十位' || getname == '十位大小' || getname == '十位单双' || getname == '后三直选复式' || getname == '第5名' || getname == '第5名大小' || getname == '第5名单双' || getname == '5-6龙虎' || getname == '第5位' || getname == '第5位大小' || getname == '第5位单双'){
        if(this.lotteryid == 11 || this.lotteryid == 14){
           indexnub = 1
         }else{
            indexnub = 4
         }
      } else if(getname == '四星直选复式' || getname == '第6名' || getname == '第6名大小' || getname == '第6名单双'){
          indexnub = 5
      } else if(getname == '五星直选复式' || getname == '第7名' || getname == '第7名大小' || getname == '第7名单双'){
          indexnub = 6
      } else if(getname == '第8名' || getname == '第8名大小' || getname == '第8名单双'){
          indexnub = 7
      } else if(getname == '第9名' || getname == '第9名大小' || getname == '第9名单双'){
          indexnub = 8
      } else if(getname == '第10名' || getname == '第10名大小' || getname == '第10名单双'){
          indexnub = 9
      } 

      if(!this.dmnub){
        this.$toast({message: '请输入定码个数'});
          return
      }
     
        var userarr = ''
        if(this.rcarr.name == undefined){
          userarr = this.$store.state.leftrecommend[0]
        }else if(this.rcarr.name){
          userarr = this.rcarr
        } 

        if(userarr.name == '定位系列' || userarr.name == '直选系列'){
          if( this.casetype == 'ssc' || this.casetype == 'pk10' || this.casetype == 'l3d' ){
            this.dmnubmaxlength = 1
          } else if( this.casetype == 'l11x5'  ){
            this.dmnubmaxlength = 2
            if(this.dmnub>10){
                this.$toast({message: '定码个数最大可输入10'});
                return  
            }
          } else if( this.casetype == 'k3'  ){
            this.dmnubmaxlength = 1
            if(this.dmnub>5){
                this.$toast({message: '定码个数最大可输入5'});
                return  
            }
          }    
                 
        }
        if (userarr.name == '大小系列' || userarr.name == '龙虎系列' || userarr.name == '单双系列'){
          if(this.dmnub != 1){
            this.$toast({message: '定码个数只能输入数字1'});
            return 
          }           
        }
         

      if(!this.cycle){
          this.$toast({message: '请输入计划周期'});
          return
      }
      if(this.cycle<1 || this.cycle>100){
          this.$toast({message: '计划周期最高可输入100期，最低可输入1期'});
          return
      }
      
      var params = {
        lottery_id: this.lotteryid,
        label_id: this.leftcacheinfo.id,
        fixed_num: this.dmnub,
        index:indexnub,
        limit: this.cycle
      }
      this.https('Forecast/getShowAllThePlansList',params).then(data => {
        this.showinfodata = data
      })
    }, 

    changewebsocketinfo(){ //websoket推送后更改的列表数据
      var indexnub
      var getname = this.leftcacheinfo.name;
      if(getname == '万位' || getname == '万位大小' || getname == '万位单双' || getname == '前二直选复式' || getname == '龙虎' || getname == '冠军' || getname == '冠军大小' || getname == '冠军单双' || getname == '1-10龙虎' || getname == '大小' || getname == '第1位' || getname == '第1位大小' || getname == '第1位单双'){
          indexnub = 0
      } else if(getname == '千位' || getname == '千位大小' || getname == '千位单双' || getname == '后二直选复式' || getname == '亚军' || getname == '亚军大小' || getname == '亚军单双' || getname == '2-9龙虎' || getname == '单双' || getname == '第2位' || getname == '第2位大小' || getname == '第2位单双'){
          indexnub = 1
      } else if(getname == '百位' || getname == '百位大小' || getname == '百位单双' || getname == '前三直选复式' || getname == '季军' || getname == '季军大小' || getname == '季军单双' || getname == '3-8龙虎' || getname == '第3位' || getname == '第3位大小' || getname == '第3位单双'){        
         if(this.lotteryid == 11 || this.lotteryid == 14){  // 福彩3d，江苏快三，百位大小/百位单双从0开始
           indexnub = 0
         }else{
            indexnub = 2
         }
      } else if(getname == '个位' || getname == '个位大小' || getname == '个位单双' || getname == '中三直选复式' || getname == '第4名' || getname == '第4名大小' || getname == '第4名单双' || getname == '4-7龙虎' || getname == '第4位' || getname == '第4位大小' || getname == '第4位单双'){
        if(this.lotteryid == 11 || this.lotteryid == 14){
           indexnub = 2
         }else{
            indexnub = 3
         }
      } else if(getname == '十位' || getname == '十位大小' || getname == '十位单双' || getname == '后三直选复式' || getname == '第5名' || getname == '第5名大小' || getname == '第5名单双' || getname == '5-6龙虎' || getname == '第5位' || getname == '第5位大小' || getname == '第5位单双'){
        if(this.lotteryid == 11 || this.lotteryid == 14){
           indexnub = 1
         }else{
            indexnub = 4
         }
      } else if(getname == '四星直选复式' || getname == '第6名' || getname == '第6名大小' || getname == '第6名单双'){
          indexnub = 5
      } else if(getname == '五星直选复式' || getname == '第7名' || getname == '第7名大小' || getname == '第7名单双'){
          indexnub = 6
      } else if(getname == '第8名' || getname == '第8名大小' || getname == '第8名单双'){
          indexnub = 7
      } else if(getname == '第9名' || getname == '第9名大小' || getname == '第9名单双'){
          indexnub = 8
      } else if(getname == '第10名' || getname == '第10名大小' || getname == '第10名单双'){
          indexnub = 9
      }   

      var params = {
        lottery_id: this.lotteryid,
        id: this.planinfoid,
        label_id: this.leftcacheinfo.id,
        index:indexnub,
        start_id: this.startid
      }

      this.https('Forecast/getClientPlanForecastList',params, 'post').then(data => {
        if(data!=null){
          // data.forecast_list.forEach(item => {
          //         item.forecast_code = item.forecast_code.replace(/\s+/g,"");
          //     })      
          if((data.forecast_list[0].plan_result == '挂' && data.current_cycle != 1)){
              this.planlist.pop();
              this.planlist.pop();
              this.planlist.push(data.forecast_list[1]);
          }else{
              this.planlist.pop();
               data.forecast_list.forEach(item => {
                  this.planlist.push(item)
              })      
          }
            // this.plan_result = data.plan_result
         this.statisticalPlanningStatus();
         this.planlistinfo = data.forecast_list; 
         this.planinfoid = data.forecast_list[1].id;
        }
       
      })
    },
     closeallplan() { //关闭显示所有计划弹框
      this.allplanshow = false;
    },
    closeKeepall() { //关闭保存所有数据弹框
      this.keepalldatashow = false;
    },
    copyplanFn(){ //复制计划
        var copyinfo = ''
        if(this.multipleSelection.length>0){
          this.multipleSelection.forEach( item => {
              copyinfo += item.plan_periods +' '+ item.forecast_code +' '+ item.plan_result +' '+ item.forecast_code
          })
        }
        
        var oInput = document.createElement('input');
        oInput.value = copyinfo;
        document.body.appendChild(oInput);
        oInput.select(); // 选择对象
        document.execCommand("Copy"); // 执行浏览器复制命令
        oInput.className = 'oInput';
        oInput.style.display='none';
    },
   
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    parentSelectionFuc(data) {
    },
  }
};
</script>

<style>
.fillin .el-select {
  width: 0.9rem;
  margin-top: 0.06rem;
}
.fillin .el-input__inner {
  height: 0.25rem;
}
.group_hair .el-input__inner {
  width: 1.3rem;
  font-size: 0.12rem;
  color: #333333;
  height: 0.25rem;
  line-height: 0.25rem;
}
.container .el-select-dropdown__item {
  font-size: 0.12rem;
  padding: 0 0.5rem;
}
.container table{
  font-family: Arial,"Microsoft YaHei" !important;
}
.container .el-table td, .el-table th{
  padding: 8px 0 !important;
}
.fillin select {  
    border: solid 1px #dddddd;
    appearance:none;   
    background: url("../../assets/img//plan/images/selectbtn_03.png") no-repeat scroll center transparent; 
    background-position: 0.7rem;
    padding:0 0.03rem;  
    background-color: #ffffff
  }
  .cell{
  font-size: 0.13rem !important;
  font-weight: bold;
  white-space: pre-line !important;
}
.uqren-boder{
  border:solid 1px #ddd;
  padding: 2px 10px;
  height: 0.24rem;
  min-width: 0.5rem;
  margin-top: 0.03rem;
}
</style>;

<style lang="less" scoped>
@import url(../../assets/css/plan/plancontent.less);
</style>
